Programming languages continue to evolve to facilitate specification by programmers as well as efficient execution. In the early days of computer languages, low-level machine code was prevalent. With machine code, a computer program or instructions comprising a computer program were written with machine languages or assembly languages and executed by the hardware (e.g., microprocessor). These languages provided an efficient means to control computing hardware, but were very difficult for programmers to comprehend and develop sophisticated logic.
Subsequently, languages were introduced that provided various layers of abstraction. Accordingly, programmers could write programs at a higher level with a higher-level source language, which could then be converted via a compiler or interpreter to the lower level machine language understood by the hardware. Further advances in programming have provided additional layers of abstraction to allow more advanced programming logic to be specified much quicker then ever before. However, these advances do not come without a processing cost.
Compilers and/or interpreters bear the burden of translating high-level logic into executable machine code. In general, a compilers and/or interpreters are components that receive a program specified in a source programming language (e.g., C, C#, Visual Basic, Java, . . . ) and covert the logic provided thereby to machine language that is executable by a hardware device. However, the conversion need not be done verbatim. In fact, conventional compilers and/or interpreters analyze the source code and generate very efficient code. For example, programmers write code that sets forth a logical flow of operations that is intuitive and easy for humans to understand, but is often inefficient for a computer to execute. Compilers and/or interpreters can identify inefficiencies and improve program performance at the hardware level by eliminating unnecessary operations and/or rearranging the execution of instructions while still achieving the intended results. In this manner, programmers can create robust and efficient software programs.
Within the realm of a programming language such as C#, object instances can be created by calling constructor functions and then recursively assigning object instances to the children of the just created objects. A problem with this style of object creation is that it is statement based rather than expression based, and moreover that it is extremely tedious, since it requires the programmer to explicitly define imperative statements to build a complex object instance. Even in the case where object constructors take arguments, traditional object construction remains inconvenient, since it either requires the designer of the object to expose potentially 2n overloads, where n is the number of parameters of different type. However, if there are m parameters, it means that 2m-2n combinations cannot be defined using overloading. Moreover, in addition to tedious and inefficient statement programming, compiler execution can become severely impacted, further reducing efficiency.